import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    homeArticleShow: false, // 默认底部反馈是不展示出来
    firstAction: [
      { name: '不感兴趣' },
      { name: '反馈垃圾内容' },
      { name: '拉黑作者' }
    ], // 一级面板标题
    secondAction: [{
      value: 0,
      name: '其它问题'
    },
    {
      value: 1,
      name: '标题夸张'
    },
    {
      value: 2,
      name: '低俗色情'
    },
    {
      value: 3,
      name: '错别字多'
    },
    {
      value: 4,
      name: '旧闻重复'
    },
    {
      value: 6,
      name: '内容不实'
    },
    {
      value: 8,
      name: '侵权'
    },
    {
      value: 5,
      name: '广告软文'
    },
    {
      value: 7,
      name: '涉嫌违法犯罪'
    }],
    artId: null,
    commentMax: 99, // 最大评论数量,逻辑页面最好不要痴线固定值,所以在全局这定义一个变量
    headImgUrl: ''// 用户头像地址

  },
  mutations: {
    changeActionMutations (state, bool) {
      state.homeArticleShow = bool// 修改底部反馈的状态
    },
    artIdMutations (state, val) {
      state.artId = val
    },
    setheadImgUrlMutations (state, payload) {
      state.headImgUrl = payload
    }
  },
  actions: {
  },
  modules: {
  }
})
